package tau.dimes.beans;

public class Visualization
{
	private String visualizationType;
	private String provider;
	private String filename;
	private int windowSize;
	private int interval;
	private String resolution;
	private String submit;
	private boolean showGrid;
	private boolean smooth;
	private boolean aviRecord;
	private int fps;
	private boolean fadeButKeep;
	private int maxCircleRadius;
	private String zoomMode;
	private int minLatitude;
	private int maxLatitude;
	private int minLongitude;
	private int maxLongitude;
	private String bgImage;

	public String getSubmit()
	{
		return submit;
	}

	public void setSubmit(String submit)
	{
		this.submit = submit;
	}

	public String getVisualizationType()
	{
		return visualizationType;
	}

	public void setVisualizationType(String visualization)
	{
		this.visualizationType = visualization;
	}

	public String getProvider()
	{
		return provider;
	}

	public void setProvider(String provider)
	{
		this.provider = provider;
	}

	public String getFilename()
	{
		return filename;
	}

	public void setFilename(String filename)
	{
		this.filename = filename;
	}

	public int getWindowSize()
	{
		return windowSize;
	}

	public void setWindowSize(int windowSize)
	{
		this.windowSize = windowSize;
	}

	public int getInterval()
	{
		return interval;
	}

	public void setInterval(int interval)
	{
		this.interval = interval;
	}

	public String getResolution()
	{
		return resolution;
	}

	public void setResolution(String resolution)
	{
		this.resolution = resolution;
	}

	public String getXMLRequest()
	{
		String xmlRequest = String.format("<DataRequest>" + "<Provider>%s</Provider>"
			+ "<Attributes>" + "<Attribute name=\"Filename\">%s</Attribute>" + "</Attributes>"
			+ "</DataRequest>", getProvider(), getFilename());
		return xmlRequest;
	}

	public int getWidth()
	{
		if (resolution != null)
		{
			if (resolution.equals("low"))
				return 600;
			else if (resolution.equals("medium"))
				return 800;
			else if (resolution.equals("high"))
				return 1024;
		}

		return 0;
	}

	public int getHeight()
	{
		if (resolution != null)
		{
			if (resolution.equals("low"))
				return 300;
			else if (resolution.equals("medium"))
				return 400;
			else if (resolution.equals("high"))
				return 512;
		}

		return 0;
	}

	public void setShowGrid(boolean showGrid)
	{
		this.showGrid = showGrid;
	}

	public boolean isShowGrid()
	{
		return showGrid;
	}

	public void setSmooth(boolean smooth)
	{
		this.smooth = smooth;
	}

	public boolean isSmooth()
	{
		return smooth;
	}

	public boolean isAviRecord()
	{
		return aviRecord;
	}

	public void setAviRecord(boolean aviRecord)
	{
		this.aviRecord = aviRecord;
	}

	public int getFps()
	{
		return fps;
	}

	public void setFps(int fps)
	{
		this.fps = fps;
	}

	public boolean isFadeButKeep() 
	{
		return fadeButKeep;
	}

	public void setFadeButKeep(boolean fadeButKeep) 
	{
		this.fadeButKeep = fadeButKeep;
	}

	public void setMaxCircleRadius(int maxCircleRadius) 
	{
		this.maxCircleRadius = maxCircleRadius;
	}

	public int getMaxCircleRadius() 
	{
		return maxCircleRadius;
	}

	public void setZoomMode(String zoomMode) 
	{
		this.zoomMode = zoomMode;
	}

	public String getZoomMode() 
	{
		return zoomMode;
	}

	public int getMinLatitude() 
	{
		return minLatitude;
	}

	public void setMinLatitude(int minLatitude) 
	{
		this.minLatitude = minLatitude;
	}

	public int getMaxLatitude() 
	{
		return maxLatitude;
	}

	public void setMaxLatitude(int maxLatitude) 
	{
		this.maxLatitude = maxLatitude;
	}

	public int getMinLongitude() 
	{
		return minLongitude;
	}

	public void setMinLongitude(int minLongitude) 
	{
		this.minLongitude = minLongitude;
	}

	public int getMaxLongitude() 
	{
		return maxLongitude;
	}

	public void setMaxLongitude(int maxLongitude) 
	{
		this.maxLongitude = maxLongitude;
	}

	public void setBgImage(String bgImage) 
	{
		this.bgImage = bgImage;
	}

	public String getBgImage() 
	{
		return bgImage;
	}
}
